home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmCT_304_zWindow < prev    next >
Encoding:
Text File  |  1990-03-23  |  2.2 KB  |  86 lines

  1. /* %filename% -- window methods */
  2. /* Created %date% %time% by AppMaker */
  3.  
  4. /*    We recommend that you not modify this module and instead modify        */
  5. /*    its subclass, %WindName%.  The 'z' prefix on this module marks%        %*/
  6. /*    a module which is likely to be regenerated by AppMaker after you    */
  7. /*    make changes to the user interface.  The modules without the 'z'    */
  8. /*    prefix will not be regenerated by AppMaker unless you delete them.    */
  9. /*    Using a separate subclass to override the AppMaker-generated code    */
  10. /*    lets you regenerate code without losing your hand-coded changes.    */ 
  11.  
  12. #include <Commands.h>
  13. #include <Constants.h>
  14. #include <Global.h>
  15. #include <CDecorator.h>
  16. #include <CDesktop.h>
  17. #include <CError.h>
  18. #include <CRadioGroup.h>
  19. #include <CSizeBox.h>
  20. #include <TBUtilities.h>
  21. #include "z%WindName%.h"
  22.  
  23. #define    %WindName%ID%    %%rsrcID%        /* resource ID for WIND template */
  24.  
  25. extern    CDecorator        *gDecorator;    /* Window dressing object    */
  26. extern    CDesktop        *gDesktop;        /* The enclosure for all windows */
  27. extern    CError            *gError;        /* The error handling object */
  28. extern    CBureaucrat        *gGopher;        /* The current boss in the chain of command */
  29.  
  30. /*----------*/
  31. void    Z%WindName%::I%WindName%    (CDirector    *aSupervisor)
  32. {
  33.     CView            *enclosure;
  34.     CBureaucrat        *supervisor;
  35.     CSizeBox        *aSizeBox;
  36.     CRadioGroup        *aGroup;
  37.  
  38.     IWindow (%WindName%ID, FALSE, gDesktop, aSupervisor);
  39.     itsMainPane = NULL;
  40.     itsGopher = aSupervisor;
  41.     enclosure = this;
  42.     supervisor = this;
  43.     
  44.     %if has mainScroll%
  45.         mainScroll = new (CScrollPane);
  46.         mainScroll->IViewRes ('ScPn', %paneID%, enclosure, supervisor);
  47.         mainScroll->FitToEnclFrame (TRUE, TRUE);
  48.         enclosure = mainScroll;
  49.         mainPanorama = NULL;
  50.     %else%
  51.         %if has growBox%
  52.             aSizeBox = new (CSizeBox);
  53.             aSizeBox->ISizeBox (enclosure, supervisor);
  54.         %endif%
  55.     %endif%
  56.     %for each item gen create%
  57.     
  58.     %if has mainScroll%
  59.         if (mainPanorama != NULL) {
  60.             mainScroll->InstallPanorama (mainPanorama);
  61.         }
  62.     %endif%
  63. } /* I%WindName% */
  64.  
  65. %for each item gen zMake%
  66. /*----------*/
  67. void Z%WindName%::Activate        (void)
  68. {
  69.     inherited::Activate ();
  70.     gGopher = itsGopher;
  71.  
  72. } /* Activate */
  73.  
  74. /*----------*/
  75. void Z%WindName%::DoCommand        (long        theCommand)
  76. {
  77.     switch (theCommand) {
  78.         default:
  79.                 inherited::DoCommand (theCommand);
  80.             break;
  81.     } /* switch */
  82.  
  83. } /* DoCommand */
  84.  
  85. /* %filename% */
  86.